<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Manage Index</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="../../files/css/layui.css" media="all">
<script type="text/javascript"
	src="../../files/js/jquery-1.10.2.js"></script>
	
<script type="text/javascript" src="../../commom/js/base.js"></script>
<script type="text/javascript">
	function locUrl(url){
		$("#demoAdmin").attr("src",url);
	}
	 
	 
	function showMod(mods){
		var html = "";
		for(var i=0;i<mods.length;i++){
			html = html + "<dd class='layui-this'>"; 
			if(mods[i].list==null ){
				html = html + "<a href='javascript:locUrl(\""+mods[i].url+"\");'>"+mods[i].name+"</a>";
			}else{
				html = html + "<li class='layui-nav-item'><a class='' href='javascript:;'>"+mods[i].name+"</a><dl class='layui-nav-child'>";
				html = html + showMod(mods[i].list);
				html = html + "</dl></li>";
			}
			html = html + "</dd>";
		}
		return html;
	}
	$(function() {
		$.ajax({
			url:getRootPath()+'module/findMod.action',
			type:"post",
			async: false,
			dataType: "JSON",
			success:function(fh){
				var html = "";
				html = html + "<li class='layui-nav-item'><a class='' href='javascript:;'>根模块</a><dl class='layui-nav-child'>";
				var html = html + showMod(fh[1]);
				html = html + "</dl></li>";
				
				$("#cd").append(html);
				 
				var data = fh[0];
				$("#tupian").html(data.manUser);
				
			},
			error:function(data){
				alert("系统出错");
			}
		})
	})
</script>
</head>
<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header">
			<div><a href="" class="layui-logo">GUCCI后台管理</a></div>
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item"><a id="tupian" href="javascript:;"></a>
				</li>
				<li class="layui-nav-item"><a href="../../manager/showLogin.action">注销</a></li>
			</ul>
		</div>
		<div class="layui-side layui-bg-black">
			<div class="layui-side-scroll">
				<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
				<ul id="cd" class="layui-nav layui-nav-tree site-demo-nav">
					
				</ul>
			</div>
		</div>
		<div class="layui-body">
			<!-- 内容主体区域 -->
			<div style="padding: 15px;">
				<iframe src="main.html" frameborder="0"
					id="demoAdmin" style="width: 100%;"></iframe>
			</div>
		</div>
		<div class="layui-footer">
			<!-- 底部固定区域 -->
			© WinnerClass have good team spirit,but not everyone.
		</div>
	</div>
	<script src="../../files/js/layui.js" charset="utf-8"></script>
	<script>
		layui.use('element', function(){
			  var element = layui.element;
		});
		layui.use('layer', function(){
		  var $ = layui.$
		  ,setIframe = function(){
		    var height = $(window).height()-70;
		    $('#demoAdmin').height(height);
		  };
		  
		  setIframe();
		  $(window).on('resize', setIframe);
		});
	</script>
</body>
</html>
